This invention relates generally to a method and apparatus for providing overload protection for a circuit. This invention has particular application in the protection of a digital ballast used for controlling electric lamps.
Fluorescent and High Intensity Discharge (HID) lamps are commonly controlled by an electronic ballast. The ballast drives the lamp with an alternating square wave of a particular frequency. The reason this is done is that due to the physics of such lamps, current cannot pass in one single direction continually without adversely affecting the operation of, or damaging, the lamp. As well, due to the physics and composition of the electronic ballast which drives the discharge lamp, there are inherent limits as to the voltage which can exist across, and the current which can flow through, the ballast and the lamp. Voltages in excess of the maximum rated voltage for the lamp, as well as currents in excess of the maximum rated current for the lamp, will damage the lamp. These ratings vary with the type and robustness of the lamp in question. Accordingly, protections for an over-voltage or an over-current situation are very important in the design of lighting systems. As well, panic protection (i.e., protecting against a transient surge with extremely fast onset) and the related ability of the lamp driving circuit to automatically shut itself off, or dramatically decrease the voltage across it, and the current passing through it, is necessary. The existence of protections such as these in the ballast system can potentially save the lamp and ballast, as well as peripheral equipment.
Generally, electronic ballast overload protection is effected using analog comparators, where an overload protection circuit comprising analog comparators is hardwired to the lamp, and designed to continually sense the lamp voltage and the lamp current. If the value of the voltage or current is larger than a reference value built into the comparator, the comparator will output a signal to shut down the switching pulse generated by the ballast and the lamp will not be driven. Certain ballasts are microprocessor based. These microprocessor-based ballasts may also use analog comparators to detect the lamp voltage or the lamp current and shut down the switching signal when there is an overage.
Alternatively, the output of the analog comparator can be sent to the central processing unit (CPU) of the microprocessor driving the lamp with a pulse width modulated (PWM) signal. The comparator output will activate a software program that will change the PWM module""s settings to either shut down the switching pulse or to reduce the pulse width so as to insure that the power delivered to the lamp will be low enough to resolve the overcurrent or overvoltage condition.
Therefore, in the current state of the art, electronic ballast overload protection is effected via either analog circuitry operating alone or analog circuitry operating as an auxiliary to a microprocessor; in both cases sensing is done via analog comparators; in the former case the comparators generate the signal which shuts down the switching pulse via a hardware circuit. In the latter case, the comparators signal the CPU which shuts down the switching pulse, or reduces its pulse width, driving the lamp.
There are problems inherent in both methods currently used to provide overload protection for an electronic ballast. What will first be discussed is the pure hardware solution using analog comparators. The use of analog comparators for ballast failure protection is both unstable and unreliable. In the first instance, the parameters of the protection circuit are sensitive to variations in temperature and process technology, and are therefore plagued by substantial variability from the nominal values of maximum current and maximum voltage that they protect against. Additionally, even assuming that the reference voltages and reference currents in the comparators can be suitably or acceptably calibrated for the circuit in which they are used, the resulting protection circuit would not be programmable or of much use in any other circuit. Accordingly, in the analog pure-hardware protection circuit, it would only be useful for protecting against one particular voltage and one particular current limit. Such a protection circuit would neither be universal or adjustable in any sense and could not be used as a standard component of a ballast designed to control a variety of lamps and lamp driving circuits.
On the other hand, using a pure software solution does gain the advantage of flexibility, in that the maximum current and maximum voltage against which the protection circuit protects can be programmable. Thus the circuit can be used with a variety of lamps and lamp driving circuits, as well as offering flexibility to change the overload maxima as noise and other conditions may warrant. All that is needed is to reprogram the CPU to change the PWM signal upon a particular condition (e.g., maximum voltage) occurring for example, if the override circuit trips at too low a voltage, then values utilized by the software can simply be changed. The hardware solution would require various component changes.
The speed with which the overage decision-making process can be made in the pure-software solution is generally too slow to protect circuits from a panic or near panic situation. A panic situation is one where there is a severe current overage or a severe voltage overage occurring in the lamp and the protection circuit must respond immediately if the damage to the lamp is to be prevented. The CPU and software simply take too long to respond.
In general, providing overload protection via analog hard wiring is inaccurate and inflexible. Providing the protection in the CPU software means that any overload condition has to be processed through the CPU, because an adjustment must be made, and a new PWM signal generated. This takes too long.
As a result of the foregoing discussion, clearly a significant need exists in the art for an overload protection circuit for an electric lamp which can provide both the programmable flexibility of a software solution with the immediacy and speed that can only be currently delivered by a hardwired overload protection circuit.
The above-described shortfalls of the prior art are overcome in accordance with the teachings of the present invention which relates to an apparatus and method for providing overload protection for a circuit by means of a hybrid software and hardware solution. In the preferred embodiment, this circuit is used in a digital ballast controlling electric lighting using a half-bridge power converter commonly used to control fluorescent lamps. The invention can easily be expanded to a four-bridge power converter circuit used for controlling HID lamps. In either case the driving output is an AC pulse train.
In a preferred embodiment, PWM signals are determined by the value stored in one of two registers. The value in a first register is used during normal operation. In overload conditions, a hardware digital sensor is used to directly cause the system to use the value in the second register to control the PWM signal without signaling the CPU software to adjust the PWM signal. Thus, the PWM signal is adjusted to account for the overload without the delay required for the CPU to process the overload. Nonetheless, since the overload condition is handled by changing digital values controlling a PWM signal, the flexibility of software solutions is maintained, since changing conditions only require that a different value be stored in the overload register or the digital sensor.
Effectively, the pulse trains are specified and generated via hardware logic gates and stored data during overload conditions, and software instructions otherwise (e.g. normal conditions).